"use strict";

const Controller = require("egg").Controller;

class UtilsController extends Controller {
  async uploadFiles() {
    const { ctx } = this;
    try {
      const data = await ctx.service.utils.uploadFiles();
      ctx.body = {
        code: 200,
        data,
      };
    } catch (error) {
      this.ctx.body = {
        code: -1,
        data: null,
        message: error.message,
      };
    }
  }
}

module.exports = UtilsController;
